package com.czp.mall.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

import feign.Contract;
import feign.Feign;
import feign.Logger;

@Configuration
public class ItemFeignHystrixDisableClientConfiguration {

	@Bean
	public Contract feignContract() {
		System.out.println("加载feign自定义配置...");
		return new feign.Contract.Default(); // 使用feign默认的配置，而不是使用springmvc的
	}
	
	/**
	 * 禁用feign的hystrix
	 */
	@Bean
	@Scope("prototype") // 
	public Feign.Builder feignBuilder(){
		return Feign.builder();
	}
	
}
